﻿using Domain.Entitys.FG;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.EntityConfigurations.FG
{
    public class FG_Finished_Goods_StoreConfiguration : IEntityTypeConfiguration<FG_Finished_Goods_Store_Details>
    {
        public void Configure(EntityTypeBuilder<FG_Finished_Goods_Store_Details> builder)
        {
            builder.ToTable("fg_finished_goods_store_details");
            builder.HasKey(sgsd => sgsd.Finished_goods_store_details_id);
            builder.HasOne(sgsd => sgsd.Main)
                .WithMany(sgsd => sgsd.Details)
                .HasForeignKey(sgsd => sgsd.Finished_goods_store_id);
        }
    }
}
